package pl.PawelAndAlicja.badugiproject.main.Cards;

import java.util.Random;

import pl.PawelAndAlicja.badugiproject.main.Cards.FlyweightFactoryCard;

public class HandMaster extends ClientDeck {

    public HandMaster(FlyweightFactoryCard factoryCard) {
        super(factoryCard);
    }

    String[] cardTypes = {"Spade","Club","Diamond","Heart"};
	String[] cardName = {"King", "Queen", "Jack", "10", "9", "8", "7", "6", "5", "4", "3", "2", "Ace"};

	public FlyweightCard pullOut()  { 
		Random random = new Random(); 
		int valueOfCardTypes = random.nextInt(cardTypes.length);
		int valueOfCardName = random.nextInt(cardName.length);
		return createCard(cardTypes[valueOfCardTypes], cardName[valueOfCardName]);
	}
	
	public void pullIn (FlyweightCard card)  {
		removeCard(card.getName(), card.getType());
	}
    public void showDeck(){
        getFlyweightFactoryCard().showArrayCards();
    }

	public static void main(String[] args) {
	}
}
